<template>
	<block>
	<view style="overflow: hidden;height: 360rpx;position: relative;background: #fff" v-if="!diyitem.params.style || diyitem.params.style == 'default1'">
		<view class="member-head" style="z-index:100;border: none;">
			<view class="child">
				<view class="title" :style="'color:' + diyitem.style.textcolor || ''">{{ member.moneytext }}</view>
				<view class="number" :style="'color:' + diyitem.style.textlight || ''">{{ member.credit2 }}</view>
				<navigator
					class="btn"
					hoverClass="btn-hover"
					openType="navigate"
					:style="'color:' + diyitem.style.textcolor || '' + ';border-color:' + diyitem.style.textcolor || ''"
					:url="diyitem.params.leftnavlink"
					v-if="member.open_recharge"
				>
					{{ diyitem.params.leftnav }}
				</navigator>
			</view>
			<view class="child userinfo">
				<view :class="'avatar ' + diyitem.style.headstyle || ''"><image class="icon" :src="member.avatar || '/static/static/images/noface.png'"></image></view>
				<view class="nickname">{{ member.nickname || '未更新用户信息' }}</view>
				<view class="level">{{ member.levelname }}</view>
				<view @tap="navigate" class="facebtn" v-if="!member.nickname">登录</view>
			</view>
			<view class="child">
				<view class="title" :style="'color:' + diyitem.style.textcolor || ''">{{ member.credittext }}</view>
				<view class="number" :style="'color:' + diyitem.style.textlight || ''">{{ member.credit1 }}</view>
				<navigator
					class="btn"
					hoverClass="btn-hover"
					:style="'color:' + diyitem.style.textcolor || '' + ';border-color:' + diyitem.style.textcolor || ''"
					:url="diyitem.params.rightnavlink"
					v-if="member.open_creditshop == 1"
				>
					{{ diyitem.params.rightnav }}
				</navigator>
			</view>
		</view>
		<view class="member_header" :style="'background:' + diyitem.style.background + ';border-color:' + diyitem.style.background"></view>
		<block v-if="member.usemembercard">
			<navigator class="member_card" hoverClass="none" openType="navigate" :url="'/pages/member/membercard/index?hasmembercard=' + member.hasmembercard">
				<image class="icon" src="/static/static/images/icon-huangguan.png"></image>
				<view class="title">我的会员卡</view>
				<view class="card-num">已拥有{{ member.hasbuycardnum }}张</view>
			</navigator>
			<image class="cover-img" src="/static/static/images/cover.png"></image>
		</block>
	</view>
	<view class="headinfo style-2" :style="'background:' + diyitem.style.background + ';'" v-else>
		<navigator
			class="icon-style2"
			hoverClass="none"
			openType="navigate"
			:url="'/pages/member/membercard/index?hasmembercard=' + member.hasmembercard"
			v-if="member.usemembercard"
		>
			<image src="/static/static/images/header-style2.png"></image>
		</navigator>
		<navigator class="setbtn" :url="diyitem.params.setlink"><i :class="'icox ' + diyitem.params.seticon"></i></navigator>
		<view :class="'face ' + diyitem.style.headstyle || ''"><image class="icon" :src="member.avatar || '/static/static/images/noface.png'"></image></view>
		<view class="inner">
			<view class="name" :style="'color:' + diyitem.style.textcolor || ''">{{ member.nickname || '未更新' }}</view>
			<view class="level" :style="'color:' + diyitem.style.textcolor || ''" v-if="member.levelname">{{ member.levelname || '-' }}</view>
			<view class="credit" :style="'color:' + diyitem.style.textcolor || ''" v-if="member.credit2">
				{{ member.moneytext }} :
				<text :style="'color:' + diyitem.style.textlight || ''" v-if="member.credit2">{{ member.credit2 || '-' }}</text>
			</view>
			<view class="credit" :style="'color:' + diyitem.style.textcolor || ''" v-if="member.credit1">
				{{ member.credittext }} :
				<text :style="'color:' + diyitem.style.textlight || ''">{{ member.credit1 || '-' }}</text>
			</view>
			<view @tap="navigate" class="facebtn" v-if="!member.nickname">登录</view>
		</view>
	</view>
</block>
</template>
<script>
export default {
	props: {
		diyitem: {
			type: Object
		},
		member: {}
	},
	created() {
		console.log(this.diyitem)
	},
	methods:{
		navigate:function(e){
			this.$emit("gm",e)
		}
	}
};
</script>
<style>
.page {
    border-color: #C5A457;
}

.fui-copyright-group {
    text-align: center;
    padding: 20rpx 24rpx;
    color: #cecece;
}

.fui-copyright-group image {
    width: 60rpx;
    height: 60rpx;
    vertical-align: middle;
    margin-right: 10rpx;
}

.fui-copyright2-group {
    text-align: center;
    padding: 10rpx 24rpx 0;
    color: #cecece;
}

.fui-copyright2-group image {
    width: 60rpx;
    height: 60rpx;
}

.notification {
    width: 15px;
    height: 15px;
    vertical-align: middle;
    margin: 0px 0px 6px 5px;
    border-left: 1px solid #efefef;
    padding-left: 10rpx;
}

.member-head {
    height: 260rpx;
    background: transparent;
    padding-top: 40rpx;
    position: relative;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
}

.headinfo.style-2 {
    padding: 40rpx;
    background: #FF9031;
    border: none;
}

.member .headinfo .setbtn {
    height: 60rpx;
    width: 60rpx;
    position: absolute;
    top: 8rpx;
    right: 10rpx;
    font-size: 48rpx;
    color: #fff;
    line-height: 48rpx;
    text-align: center;
}

.member .headinfo.style-2 .face {
    height: 160rpx;
    width: 160rpx;
    border-radius: 160rpx;
    float: left;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    flex-shrink: 0;
    -webkit-box-lines: single;
    -moz-box-lines: single;
    flex-wrap: nowrap;
    box-sizing: border-box;
    -webkit-box-align: center;
    align-items: center;
}

.member .headinfo.style-2 .face image {
    height: 120rpx;
    width: 120rpx;
    border-radius: 120rpx;
    display: block;
}

.member .headinfo.style-2 .face.radius,.member .headinfo.style-2 .face.radius image {
    border-radius: 20rpx;
}

.member .headinfo.style-2 .inner {
    height: auto;
    position: relative;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    display: block;
    padding-left: 20rpx;
    color: #fff;
}

.member .headinfo.style-2 .inner .name {
    font-size: 32rpx;
    line-height: 48rpx;
}

.member .headinfo.style-2 .inner .level,.member .headinfo.style-2 .inner .credit {
    font-size: 24rpx;
    line-height: 36rpx;
}

.member .headinfo.style-2 .inner text {
    color: #fef31f;
}

.headinfo {
    position: relative;
    height: auto;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

.headinfo .icon-style2 {
    display: inline-block;
    width: 230rpx;
    height: 72rpx;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    z-index: 999;
}

.headinfo .icon-style2 image {
    width: 100%;
    height: 100%;
}

.member-head .setting {
    height: 48rpx;
    width: 48rpx;
    overflow: hidden;
    position: absolute;
    top: 10rpx;
    right: 18rpx;
    background: none;
    border: 0;
    padding: 0;
}

.member-head .setting:after {
    display: none;
}

.member-head .setting image {
    height: 40rpx;
    width: 40rpx;
    vertical-align: top;
}

.member-head .child {
    width: 30%;
    text-align: center;
}

.member-head .child.userinfo {
    width: 40%;
    color: #fff;
    padding-top: 20rpx;
}

.member-head .child.userinfo .avatar {
    height: 96rpx;
    width: 96rpx;
    background: #fff;
    margin: auto;
    border-radius: 96rpx;
    border: 4rpx solid #fff;
}

.member-head .child.userinfo .avatar image {
    height: 96rpx;
    width: 96rpx;
    border-radius: 96rpx;
    display: block;
}

.member-head .child.userinfo .avatar.radius image,.member-head .child.userinfo .avatar.radius {
    border-radius: 20rpx;
}

.member-head .child.userinfo .avatar.radius image,.member-head .child.userinfo .avatar.radius {
    border-radius: 20rpx;
}

.member-head .child.userinfo .nickname {
    height: 40rpx;
    padding-top: 8rpx;
    font-size: 24rpx;
    color: inherit;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.member-head .child.userinfo .level {
    font-size: 24rpx;
    color: inherit;
    text-align: center;
}

.member-head .child .title {
    padding-top: 48rpx;
    font-size: 28rpx;
    color: #fff;
    text-align: center;
}

.member-head .child .number {
    font-size: 28rpx;
    color: #fef31f;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.member-head .child .btn {
    width: 104rpx;
    height: 40rpx;
    padding: 0;
    margin: 8rpx auto 0;
    color: #fff;
    font-size: 24rpx;
    line-height: 38rpx;
    text-align: center;
    border-radius: 40rpx;
    border: 2rpx solid #fff;
}

.facebtn {
    width: 104rpx;
    height: 40rpx;
    padding: 0;
    margin: 8rpx auto;
    color: #fff;
    font-size: 24rpx;
    line-height: 38rpx;
    text-align: center;
    border-radius: 40rpx;
    border: 2rpx solid #fff;
}

.fui-cell-group .fui-cell .fui-cell-remark {
    color: #999;
    text-align: right;
    font-size: 24upx;
    margin-right: 8rpx;
}

.contact {
    background: red;
}

.member_header {
    position: absolute;
    width: 280rpx;
    height: 120rpx;
    background: #C5A457;
    z-index: 80;
    border-radius: 50%;
    bottom: 0;
    left: 50%;
    margin-left: -160rpx;
    overflow: hidden;
    transform: scale(10,10);
/*    transform-origin: center bottom; */
/*    border: 2px solid #C5A457; */
}

.fui-cell-group:nth-of-type(1) {
    margin-top: 0;
}

.fui-icon-group .fui-icon-col .icox {
    color: #aaa;
    font-size: 48rpx;
    margin-top: 14rpx;
}

.fui-cell-group .fui-cell .fui-cell-text {
    line-height: 1;
}

.fui-cell-tip {
    padding-top: 0;
    padding-bottom: 24rpx;
}

.member .fui-icon-group .fui-icon-col .icox {
    font-size: 60rpx;
    line-height: 70rpx;
}

.fui-cell-group .fui-cell .fui-cell-icon .icox {
    font-size: 38rpx;
}

.fui-cell-group .fui-cell .fui-cell-icon {
    margin-right: 20rpx;
}

.banner-ul {
    padding: 28rpx 20rpx;
    overflow: hidden;
}

.banner-ul .banner-li:first-child {
    margin-left: 0;
}

.banner-ul .banner-li {
    border: 4rpx solid #77cd44;
    position: relative;
    overflow: hidden;
    width: 320rpx;
    border-radius: 8rpx;
    text-align: center;
    margin-left: 10rpx;
    float: left;
}

.banner-ul .banner-li view {
    width: 200rpx;
    height: 66rpx;
    position: absolute;
    top: 0;
    left: 0;
    background: #77cd44;
    transform: rotate(-25deg);
    transform-origin: left bottom;
}

.banner-ul .banner-li span {
    position: absolute;
    top: 4rpx;
    left: 4rpx;
    font-size: 20rpx;
    color: #fff;
}

.banner-ul .banner-li image {
    margin: 16rpx 0 16rpx;
    width: 42rpx;
    height: 42rpx;
    vertical-align: middle;
    border-radius: 50%;
}

.banner-ul .banner-li p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 28rpx;
    padding: 0 28rpx;
    line-height: 1;
    padding-bottom: 16rpx;
    display: block;
}

.banner-ul .banner-li-blue {
    border: 4rpx solid #68bfe7;
}

.banner-ul .banner-li-blue view {
    background: #68bfe7;
}

.banner-ul.style2 view {
    background: #77cd44;
    border: 0;
    padding: 2px;
}

.banner-ul.style2 .banner-li-blue view {
    background: #68bfe7;
}

.banner-ul.style2 view span {
    width: 40px;
    height: 18px;
    transform: rotate(0deg);
    background: rgba(0,0,0,0.3);
    position: absolute;
    left: 0;
    top: 8px;
}

.banner-ul.style2 view span {
    width: 40px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    top: 8px;
    left: 0;
}

.banner-ul.style2 .banner-li-blue {
    background: #68bfe7;
}

.model {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 199;
    display: none;
}

.model .inner {
    width: 624rpx;
    height: 600rpx;
    background: #fff;
    border-radius: 8rpx;
    margin: 260rpx auto;
    overflow: hidden;
}

.model .inner .title {
    font-size: 36rpx;
    color: #000;
    line-height: 100rpx;
    text-align: center;
    font-weight: 600;
    margin-top: 20rpx;
}

.model .inner .image {
    text-align: center;
    margin-top: 20rpx;
}

.model .inner image {
    width: 342rpx;
    height: 202rpx;
}

.model .inner .subtitle {
    margin-top: 50rpx;
    padding: 0 80rpx;
    color: #888;
    font-size: 24upx;
    line-height: 40rpx;
}

.model-btns {
    border-top: 1rpx solid #ebebeb;
    height: 100rpx;
    margin-top: 28rpx;
    display: flex;
    text-align: center;
    font-size: 30rpx;
    color: #000;
    line-height: 100rpx;
}

.model-btns .cancel {
    width: 50%;
    position: relative;
}

.model-btns .cancel:after {
    content: " ";
    position: absolute;
    top: -1rpx;
    right: 0;
    width: 1px;
    height: 210rpx;
    border-right: 1px solid #ebebeb;
    color: #ebebeb;
    transform-origin: 0 0;
    transform: scaleY(0.5);
}

.model-btns .confirm {
    width: 50%;
    color: #50b33c;
}

.fui-icon-group .fui-icon-col {
    width: 20%;
}

.fui-icon-group .fui-icon-col.cycle:after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    bottom: 0;
    width: 1rpx;
    color: #f3f3f3;
    border-left: 1rpx solid #f3f3f3;
    transform: scaleY(0.5);
}

.member_card {
    position: absolute;
    z-index: 99;
    left: 26rpx;
    bottom: 0;
    display: flex;
    width: 698rpx;
    height: 96rpx;
    margin: 0 auto 0;
    line-height: 96rpx;
    border-radius: 15rpx;
    font-size: 30rpx;
    box-sizing: border-box;
    padding: 0 30rpx;
    color: #fff;
    align-items: center;
    background: linear-gradient(to right,#c1a167,#e9d5aa);
}

.member_card .icon {
    width: 40rpx;
    height: 40rpx;
    margin-right: 20rpx;
}

.member_card .title {
    flex: 1;
    line-height: 1;
}

.member_card .card-num {
    min-width: 136rpx;
    opacity: 0.8;
    font-size: 24upx;
    text-align: right;
    line-height: 1;
}

.cover-img {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 22rpx;
    z-index: 999;
    width: 100%;
}
</style>